import { MODAL } from "../data/constants";

export const getModalTitle = (modal) => {
  switch (modal) {
    case MODAL.IMPORT:
    case MODAL.IMPORT_SRC:
      return "导入关系图";
    case MODAL.CODE:
      return "导出资源";
    case MODAL.IMG:
      return "导出图片";
    case MODAL.RENAME:
      return "重命名图表";
    case MODAL.OPEN:
      return "打开图表";
    case MODAL.SAVEAS:
      return "保存为";
    case MODAL.NEW:
      return "创建新的图表";
    case MODAL.TABLE_WIDTH:
      return "设置表格的宽度";
    default:
      return "";
  }
};

export const getOkText = (modal) => {
  switch (modal) {
    case MODAL.IMPORT:
    case MODAL.IMPORT_SRC:
      return "导入";
    case MODAL.CODE:
    case MODAL.IMG:
      return "导出";
    case MODAL.RENAME:
      return "重命名";
    case MODAL.OPEN:
      return "打开";
    case MODAL.SAVEAS:
      return "另存为";
    case MODAL.NEW:
      return "创建";
    default:
      return "确认";
  }
};
